<div class="box box-primary">
    <div class="">
        <br/>

        <div class="box box-solid">
            <div class="box-body">

                <div>
                    <a class="btn btn-danger btn-sm" href="<?php echo admin_url('clean_cache/removeall') ?>"><i
                            class="glyphicon glyphicon-trash"></i> 清空所有缓存</a>
                </div>
                <br/>
                <?php if ($dir_map) { ?>
                    <table class="table table-striped">
                        <tr>
                            <th lc>
                                缓存文件
                            </th>
                            <th>大小</th>
                            <th></th>
                        </tr>
                        <?php foreach ($dir_map as $k => $dir) { ?>
                            <?php $size = foldersize($cache_dir . $dir); ?>
                            <tr>
                                <td>
                                    <?php if ($a_link && $size) { ?>
                                        <a href="<?php echo admin_url('clean_cache?cache_folder=' . $dir); ?>"><span
                                                class="glyphicon glyphicon-hdd"></span> <?php echo $dir; ?></a>
                                    <?php } else { ?>
                                        <span class="glyphicon glyphicon-hdd"></span> <?php echo $dir; ?>
                                    <?php } ?>
                                </td>
                                <td class="dir_<?php echo $k; ?>"><?php echo byte_format($size); ?></td>
                                <td>
                                    <?php if ($size) { ?>
                                        <div class="pull-right">
                                            <a
                                               class="btn btn-xs btn-primary delete_cache"
                                               href="<?php echo admin_url('clean_cache/removedir') . '?dir=' . ($cache_folder ? $cache_folder : '') . $dir ?>"><span
                                                    class="glyphicon glyphicon-refresh"></span>
                                                清空</a>
                                        </div>
                                    <?php } ?>
                                </td>
                            </tr>
                        <?php } ?>
                    </table>
                <?php } else { ?>
                    <div class="alert alert-danger">缓存目录似乎是空的，确保你已启用数据库缓存
                    </div>
                <?php } ?>
            </div>
        </div>
    </div>
</div>